#:kivy 1.0.6
#:import DisableableButton ui.disableable_button.DisableableButton
#:import FittableLabel ui.fittable_widgets.FittableLabel
#:import Phase model.gamestate.Phase
#:import WordGuessResult model.gamestate.WordGuessResult

<ResultsOfOnePair>:
    okbutton: ok
    end_button: end_button
    word_list: word_list
    orientation: 'vertical'
    BoxLayout:
        size_hint_y: None
        height: root.height*0.2
        orientation: 'horizontal'
        DisableableButton:
            id: end_button
            text: _('Current results')
            on_release: root.to_next(True)
            enabled: (root.next_phase == Phase.FROM_TO)
        FittableLabel:
            size_hint_x: 1
            halign: 'right'
            text: 'Слов:  {}'.format(root.words_left)

    ScrollView:
        do_scroll_x: False
        size_hint_x: 1
        GridLayout:
            id: word_list
            cols: 1
            size_hint_y: None
            size_hint_x: 1

    FittableButton:
        color: 0,1,0,1
        size_hint_y: 0.5
        id: ok
        text: root.button_text[root.next_phase]
        on_release: root.to_next()

<WordLabel>:
    background_color: 0,0,0,1
    size_hint: (1, None)
    height: '35sp'
    color: self.colors[self.guess_result.result]
    text: self.guess_result.word.text
    on_release: self.swap_result()
